<%@page import="entity.Area"%>
<%@page import="java.util.List"%>
<%@page import="biz.impl.AreaBizImpl"%>
<%@page import="biz.AreaBiz"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%
	String _index = request.getParameter("index");
	String _pageSize = request.getParameter("pageSize");
	int index = Integer.parseInt(_index);
	int pageSize = Integer.parseInt(_pageSize);

	AreaBiz biz = new AreaBizImpl();

	List<Area> list = biz.findListByPage(index, pageSize);
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
	<table>
		<tr>
			<th>编号</th>
			<th>地名</th>
		</tr>
		<%
		for(Area a : list){
		%>
		<tr>
			<td>
				<%= a.getId() %>
			</td>
			<td>
				<%= a.getName() %>
			</td>
		</tr>
		<%
		}
		%>
		
		
		
		<tr>
		<td>
			<a href="list.jsp?index=<%= index -1 %>&pageSize=<%=pageSize %>">上一页</a>
		</td>
		<td>
			<a href="/demo/list.jsp?index=<%=index + 1 %>&pageSize=<%=pageSize %>">下一页</a>
		</td>
		</tr>
	</table>

</body>
</html>